package dz.chuxin.framework.widget.recycler;

import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * RecyclerView.ViewHolder 基类
 * Created by chuxin on 2016/6/30.
 */
public class BaseViewHolder extends RecyclerView.ViewHolder {

    public BaseViewHolder(View itemView) {
        super(itemView);
        itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onItemClick(v, getAdapterPosition());
            }
        });
    }

    protected void onItemClick(View v, int adapterPosition) {
    }

    protected void onBindViewHolder(int position) {
    }
}
